/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.statemachine.figure;

import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Graphics;

/**
 * PseudostateShallowHistoryFigure.
 * 
 * @author David Servat
 * @since 10 apr. 07
 */
public class PseudostateShallowHistoryFigure extends Ellipse{
    /**
     * Default Constructor.
     */
    public PseudostateShallowHistoryFigure(){

        super();
    }

    /**
     * Does nothing.
     * @see org.eclipse.draw2d.Shape#fillShape(org.eclipse.draw2d.Graphics)
    */
    @Override
    protected void fillShape(Graphics graphics){
    }
    
    /**
     * @see org.eclipse.draw2d.Ellipse#outlineShape(org.eclipse.draw2d.Graphics)
     */
    @Override
    protected void outlineShape(Graphics graphics){
        super.outlineShape(graphics);

        //'H' letter
        graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), (int) (bounds.height * 0.25)));
        graphics.drawLine(bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (-bounds.height * 0.25)), bounds.getCenter().getTranslated((int) (bounds.width * 0.15), (int) (bounds.height * 0.25)));
        graphics.drawLine(bounds.getCenter().getTranslated((int) (-bounds.width * 0.15), 0), bounds.getCenter().getTranslated((int) (bounds.width * 0.15), 0));
    }
}